'''python'''

#!/usr/bin/env python
#coding=utf-8
import sys
from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.request import CommonRequest

#String accessKeyId = "LTAI4GCqHu2LBgKgYQkmfHx4";
#String accessSecret = "jURCFHxdOX8CLAVZW2jAOcRKu5QbrZ";
client = AcsClient("LTAI4GCqHu2LBgKgYQkmfHx4", "jURCFHxdOX8CLAVZW2jAOcRKu5QbrZ", 'cn-hangzhou')
phone = sys.argv[1]
code = "{\"code\":"+sys.argv[2]+"}"
request = CommonRequest()
request.set_accept_format('json')
request.set_domain('dysmsapi.aliyuncs.com')
request.set_method('POST')
request.set_protocol_type('https') # https | http
request.set_version('2017-05-25')
request.set_action_name('SendSms')

request.add_query_param('RegionId', "cn-hangzhou")
request.add_query_param('PhoneNumbers', phone)
request.add_query_param('SignName', "box")
request.add_query_param('TemplateCode', "SMS_201652818")
request.add_query_param('TemplateParam', code)

response = client.do_action(request)
print(response) 
#print(str(response, encoding = 'utf-8'))
